/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marsaMaroc.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn; 
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 * @author Administrateur
 */
@Entity
@Table(name = "CLIENT")
public class Client implements Serializable{
    
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "CODE")
    private int codeClient;
    @Column(name = "FAX")
    private String fax;
    @Column(name = "SECTEUR_ACTIVITE")
    private String secteurActivite;
    @Column(name = "TEL_PROFESSIONNEL")
    private String telProfessionnel;
    @Column(name = "NOM_PDG")
    private String NomPDG;
    @OneToOne 
    @JoinColumn(name = "ID_COMPTE")
    private Compte compte;
    @JoinColumn(name = "ID_FACTURE")
    @OneToMany(mappedBy = "client")
    private List<Facture> factures = new ArrayList<Facture>();

    public Client() {
    }

    public int getCodeClient() {
        return codeClient;
    }

    public void setCodeClient(int codeClient) {
        this.codeClient = codeClient;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getSecteurActivite() {
        return secteurActivite;
    }

    public void setSecteurActivite(String secteurActivite) {
        this.secteurActivite = secteurActivite;
    }

    public String getTelProfessionnel() {
        return telProfessionnel;
    }

    public void setTelProfessionnel(String telProfessionnel) {
        this.telProfessionnel = telProfessionnel;
    }

    public String getNomPDG() {
        return NomPDG;
    }

    public void setNomPDG(String NomPDG) {
        this.NomPDG = NomPDG;
    }

    public Compte getCompte() {
        return compte;
    }

    public void setCompte(Compte compte) {
        this.compte = compte;
    }

    public List<Facture> getFactures() {
        return factures;
    }

    public void setFactures(List<Facture> factures) {
        this.factures = factures;
    }
    
    
     
    
    
    
}
